<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false"%>
<%
	String path = request.getContextPath();
	String webpath = path + "/qiantai";
%>

<!DOCTYPE html>
<HTML xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>云梦公益在线读书系统</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">

		<script type='text/javascript' src='<%=webpath%>/js/jquery-1.11.3.min.js'>
</script>
 
  <link rel="stylesheet"  href="<%=webpath%>/css/footer.0.14.css" />

		<script type="text/javascript">
         function admin()
         {
            var url="<%=path%>/login.jsp";
            window.open(url,"_blank");
         }
         
 
 
	     
	     
	     function check()
		 {                                                                                         
		     if(document.ThisForm.userName.value=="")
			 {
			 	alert("请输入用户名");
				return false;
			 }
			 if(document.ThisForm.userPw.value=="")
			 {
			 	alert("请输入密码");
				return false;
			 }
			 document.getElementById("indicator").style.display="block";
			 loginService.login(document.ThisForm.userName.value,document.ThisForm.userPw.value,1,callback);
		 }
		
		 function callback(data)
		 {
		    document.getElementById("indicator").style.display="none";
		    if(data=="no")
		    {
		        alert("用户名或密码错误");
		    }
		    if(data=="yes")
		    {   
		        alert("登陆成功");
		        var url="<%=path%>/qiantai/default.jsp";
		        window.location.href=url;
		    }
		 }
		 
		 function searcht(){
		    document.forms.formsearch.submit();
		 }
		 
		 function stype(id){
		     document.getElementById('types').value = id;
		     document.forms.formsearchtype.submit();
		 }
		 
		  function snl(id){
		     document.getElementById('nl').value = id;
		     document.forms.formsearchtype.submit();
		 }
		 
		    function auser()
         {
            var url="<%=path%>/auser/index.jsp";
            window.open(url,"_blank");
         }
         
    </script>

	</head>

	<body class="home" style="zoom: 1;">
  <div class="wrap">
    
    <jsp:include flush="true" page="/qiantai/common/incTop.jsp"></jsp:include>

	<div class="h20-blank"></div>
        </div>
   <div class="box-center">
    <div class="focus-wrap mb20 cf">
     <div class="focus-slider-wrap">
      <div id="j-focus-slider" class="yx-rotaion fl" style="position: relative; overflow: hidden; width: 748px; height: 298px;">
       <ul id="rotaion_list"  class="rotaion_list">
        <li style="position: absolute; left: 0px; top: 0px; display: list-item; opacity: 1;"><img src="<%=webpath%>/images/banner1.png" alt=“banner1" /></li>
        <li style="position: absolute; left: 0px; top: 0px; display: none;"><img src="<%=webpath%>/images/banner2.png" alt="banner2" /></li>
        <li style="position: absolute; left: 0px; top: 0px; display: none;"><img src="<%=webpath%>/images/banner3.png" alt="banner2" /></li>
        <li style="position: absolute; left: 0px; top: 0px; display: none;"><img src="<%=webpath%>/images/banner4.png" alt="banner3" /></li>
        <li style="position: absolute; left: 0px; top: 0px; display: none;"><img src="<%=webpath%>/images/banner5.png" alt="banner" /></li>
       </ul>
       <div id='yx-rotation-focus' class="yx-rotation-focus">
        <a class="hover" href="#">生活中的诗与远方<cite></cite></a>
        <a class="" href="#">静以修心<cite></cite></a>
        <a href="#"  class="">让书籍点亮生活<cite></cite></a>
        <a href="#"  class="">活动说明<cite></cite></a>
        <a href="#"  class="">风雨聚沙 十年成塔<cite></cite></a>
       </div>
      </div>
      <div class="focus-notice-wrap hover-icon fr">
       <h3><span>公告</span><em class="icon icon-notice"></em></h3>
       <div class="notice-list">
        <ul>
        <c:forEach items="${glist}" var="gonggao">
           <li ><a href="<%=path%>/gonggaoDetailQian.action?gonggaoId=${gonggao.gonggaoId}" target="_blank"><span>[公告]</span>${gonggao.gonggaoTitle}</a></li>
        </c:forEach>
         
        </ul>
       </div>
      </div>
     </div>
    </div>
    <div class="index-book-wrap hot-rec-wrap mb20">
     <div class="inner-wrap cf">
      <div class="left-wrap fl hover-icon">
       <h3 class="lang">新书上架<em class="icon icon-edit_rec"></em></h3>
       <div id="new-book-list">
       
       
        <div class="type-new-list cf" data-l2="1">
         <ul>
         
         
         <c:forEach items="${requestScope.zuopinList}" var="zuopin" begin="0" end="8">
          <li data-rid="1">
           <div class="book-img">
           <a target="_blank" href="<%=path%>/zuopinDetailQian.action?id=${zuopin.id}" target="_blank">
             <img src="<%=path%>/${zuopin.fujian}" /></a>
           </div>
           <div class="book-info">
            <h4><a target="_blank" href="<%=path%>/zuopinDetailQian.action?id=${zuopin.id}" target="_blank">${zuopin.types}</a></h4>
            <p> ${zuopin.ms} </p>
            <div class="state-box cf">
             <i>${zuopin.cname}</i>
             <a class="author default"><img src="<%=webpath%>/images/user.0.1.png" />${zuopin.author}</a>
            </div>
           </div></li>
          </c:forEach> 
          
           
           
     
           
         </ul>
        </div>
        
        
        
        
       </div>
      </div>
      <div class="right-wrap mb6 hover-icon fr">
       <div class="book-list-wrap fr" data-l1="10">
        <h3 class="lang">本周强推<em class="icon icon-fsg"></em></h3>
        <div class="book-list">
         <ul>
         <c:forEach items="${zlist}" var="zuopin" begin="0" end="8">
         <li ><a class="channel" href="<%=path%>/zuopinDetailQian.action?id=${zuopin.id}"  target="_blank"><em>「</em>${zuopin.cname}<em>」</em></a><a class="name" href="<%=path%>/zuopinDetailQian.action?id=${zuopin.id}" target="_blank"  >${zuopin.types}</a></li>
         </c:forEach>
          
         </ul>
        </div>
       </div>
      </div>
     </div>
    </div>
    
   <div class="footer">
    <div class="box-center cf">
     <div class="copy-right">
      <p><span>Copyright &copy; 2021-2022 云梦公益读书网 All Rights Reserved</span>版权所有 云梦公益读书团队 <a target="_blank" href="<%=path%>/login.jsp">后台登录</a></p>
      <p>本站所收录作品、社区话题、书库评论及本站所做之广告均属个人行为，与本站立场无关     &nbsp;  &nbsp;   
         
      
      </p>
     </div>
    </div>
   </div>
  </div>
   
 </body>
</html>
<script type="text/javascript">
   var num = 0;
   function jump(i){
      $('#rotaion_list li').each(function() {
           var index = $(this).index();
		   $(this).attr('style','position: absolute; left: 0px; top: 0px; display: none;');
		   if(i==index){
			    $(this).attr('style','position: absolute; left: 0px; top: 0px; display: list-item;'); 
		   }      
      })

      $('#yx-rotation-focus a').each(function() {
           var index = $(this).index();
		   $(this).attr('class','');
		   if(i==index){
			    $(this).attr('class','hover'); 
		   }      
      })
	  
   }

   function random(){
      num = num + 1;
	  if(num>=5){
		  num = 0;
	  }
	  jump(num);
   }
   $(function() {
	     
            $('#rotaion_list li').each(function() {
                $(this).click(function() {
                    console.log($(this).index());
                })
            })
            setInterval(random,3000);// 注意函数名没有引号和括弧！ 
			

   }) 
</script>